﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using MiniExcelLibs.Attributes;
using SqlSugar;

namespace Zo.ExcelBox.Models
{
    /// <summary>
    /// 表基础数据
    /// </summary>
    public class TableBase : ObservableObject
    {
        /// <summary>
        /// 主键
        /// </summary>
        [ExcelIgnore]
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true, IsNullable = false, ColumnDescription = "主键")]
        public int Id { get; set; }


        /// <summary>
        /// 创建日期
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "创建日期")]
        [ExcelColumn(Name = "创建日期", Format = "yyyy-MM-dd HH:mm:ss")]
        public DateTime CreateDate { get; set; } = DateTime.Now;


        /// <summary>
        /// 修改日期
        /// </summary>
        [ExcelIgnore]
        [SugarColumn(IsNullable = false, ColumnDescription = "修改日期")]
        public DateTime UpdateDate { get; set; } = DateTime.Now;
    }
}
